#ifndef _LOCKSECTION_H_
#define _LOCKSECTION_H_

#include <util/core.hpp>
#include <util/lockex.hpp>


#define OS_THREAD_BUSY -100
#define OS_THREAD_ERROR -1
#define OS_THREAD_SUC 0

#if (TARGET_OS == OS_WINDOWS)
    typedef int                 os_pid_t;
    typedef HANDLE              os_thread_t;
	typedef DWORD				os_thread_id;
	typedef HANDLE              os_pipe_t;
	#include <util/win/mutex.hpp>
#elif (TARGET_OS == OS_POSIX)
    typedef pid_t               os_pid_t;
    typedef pthread_t           os_thread_t;
	typedef DWORD				os_thread_id;
	typedef int              	os_pipe_t;
	#define INVALID_HANDLE_VALUE      -1
	#include <pthread.h>
	#include <util/posix/mutex.hpp>
#elif (TARGET_OS == OS_UNIX)
    typedef pid_t               os_pid_t;
    typedef pthread_t           os_thread_t;
	typedef DWORD				os_thread_id;
	typedef int              	os_pipe_t;
	#define INVALID_HANDLE_VALUE      -1
	#include <pthread.h>
	#include <util/unix/mutex.hpp>
#endif





#endif 
